package models

import "gorm.io/gorm"

type PetInfo struct {
	gorm.Model
	PetName   string `gorm:"type:varchar(30) not null" json:"pet_name"`
	PetSex    string `gorm:"type:enum('公','母')" json:"pet_sex"`
	PetAge    int    `gorm:"type:int" json:"pet_age"`
	PetTypeId int    `gorm:"type:int" json:"pet_type_id"`
	PetUserId int    `gorm:"type:int" json:"pet_user_id"`
	Img       string `gorm:"type:text" json:"img"`
}

type PetUser struct {
	gorm.Model
	UserId int `gorm:"type:int" json:"user_id"`
	PetId  int `gorm:"type:int" json:"pet_id"`
}

type UserInfo struct {
	gorm.Model
	Username string `gorm:"type:varchar(30) not null" json:"username"`
	Password string `gorm:"type:char(32) not null" json:"password"`
	UserName string `gorm:"type:varchar(30) not null" json:"userName"`
}

type PetCate struct {
	gorm.Model
	CateName string `gorm:"type:varchar(30) not null" json:"type_name"`
}
